<%@ page import="java.util.ArrayList" %>
<%@ page import="entity.Student" %><%--
  Created by IntelliJ IDEA.
  User: wang'ze'liang
  Date: 2021/8/10
  Time: 19:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

    ${list}

    <table border="1" cellspacing="0">
        <tr>
            <td>ID</td>
            <td>姓名</td>
            <td>年龄</td>
            <td>性别</td>
        </tr>

        <%
            ArrayList<Student> list = (ArrayList<Student>)request.getAttribute("list");
            for (Student student : list){
        %>
        <tr>
            <td><%=student.getId()%></td>
            <td><%=student.getName()%></td>
            <td><%=student.getAge()%></td>
            <td><%=student.getGender()%></td>
        </tr>
        <%
            }
        %>
    </table>
</body>
</html>
